import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      component: () => import('../views/MainView.vue'),
      children: [
        {
          path: '/',
          component: () => import('../views/home/IndexView.vue')
        },
        {
          path: '/user',
          component: () => import('../views/user/IndexView.vue')
        },
        {
          path: '/goods/',
          component: () => import('../views/goods/IndexView.vue')
        },
        {
          path: '/goods/series',
          component: () => import('../views/goods/SeriesView.vue')
        },
        {
          path: '/goods/issuer',
          component: () => import('../views/goods/IssuerView.vue')
        },
        {
          path: '/activity/banner',
          component: () => import('../views/activity/BannerView.vue')
        },
        {
          path: '/activity/article',
          component: () => import('../views/activity/ArticleView.vue')
        },
        {
          path: '/orderform/firstmarket',
          component: () => import('../views/orderform/FirstMarketView.vue')
        },
        {
          path: '/orderform/secondmarket',
          component: () => import('../views/orderform/SecondMarketView.vue')
        },
        {
          path: '/orderform/registration',
          component: () => import('../views/orderform/Registration.vue')
        },
        {
          path: '/orderform/useramountrecord',
          component: () => import('../views/orderform/UserAmountRecord.vue')
        },
        {
          path: '/log/',
          component: () => import('../views/log/IndexView.vue')
        },
      ]
    },
    {
      path: '/login',
      component: () => import('../views/LoginView.vue'),
    },
  ]
})

export default router
